Skip to main content

Scaler Divide Issue

There is an divide by zero error showing up when the Plume is being generated. Melissa has been working with Caleb to fix this issue.

As we were testing the complete process the issue with ​invalid value encountered in scalar divide came up again.

We looked into the code and sometimes the crosswind_s, and thus crosswind_stdev, is zero, which results in a divide by zero exception.

Scaler divide issue

Scaler divide issue

Scaler divide issue

We know this is a known issue but are wondering if there've been any changes to the code or otherwise any new information on the warning?

Are you able to share the parameters for the plume that lead to these results so I am able to debug on my end? The standard Deviation values are x = 2500 and y = 833

Scaler divide issue

Could you do me a favor and provide the source location as well?

I attached the file that has the source locations to this email. I am also adding the 1st 14 lines in the email just in case.

I am going to look into it but before I do, I wanted to ask if by chance when you are estimating the you are using the same coordinates as the detonation location and trying to estimate the concentration at the same location? In those instances, the downwind and cross wind distances will be zero, you can check for those and set the concentration to the maximum.

We shouldn't be as the detonation locations are all subcatchments and the sensor locations are Junctions, Outfalls, Dividers and Storage Units. The locations might be close together. I will look into the issue.

Are you able to add a print statement to your code to retrieve the exact parameters that lead to this error? I have the plume attributes already but it will be good to know the detonation location as well as the estimate point which triggers this error. You can capture the exception and print the parameters.